<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ include file="/WEB-INF/taglib.jsp"%>
<jsp:include page="/WEB-INF/common/head.jsp" flush="true" />
 <div class="easyui-panel addPage" data-options="fit:true,border:false,novalidate:true">
    <form class="easyui-form" id="ff" method="post" data-options="novalidate:true">
        <table class="table1">
        	
            <tr>
           		<th><span>用户名：</span></th>
               	<td>
               		<input name="id" type="hidden" value="${id}"/>
               		<div class="wrap_input"><input class="easyui-textbox" type="text" name="name" value="${item.name}" data-options="fit:true"></input></div>
           		</td>
           	</tr>
            <tr>	
           		<th><span>密码：</span></th>
               	<td>
               		<div class="wrap_input"><input class="easyui-textbox" type="text" name="password" value="${item.password}" data-options="fit:true"></input></div>
           		</td>
            </tr>
            <tr>
           		<th><span>备注：</span></th>
               	<td>
               		<div class="wrap_input"><input class="easyui-textbox" type="text" name="des" value="${item.des}" data-options="fit:true"></input></div>
           		</td>
           	</tr>
           	 <tr>
           		<th><span>chinese：</span></th>
               	<td>
               		<div class="wrap_input"><input class="easyui-textbox" type="text" name="chinese" value="${item.chinese}" data-options="fit:true"></input></div>
           		</td>
           	</tr>
        </table>
    </form>
</div>
	<script type="text/javascript">
		
	top.window.subPage.save = save;
	function save() {
		if($("#ff").form('enableValidation').form('validate')) {
			$.post("${context_path}/sys/user/save", getParam(), function(data) {
				top.window.closeWindow();
				top.window.subPage.loadCurrDatagrid();
			});
		}
	}
	function getParam() {
		var param = {
	       	    "name": $(":input[name='name']").val(), 
	       	    "password": $(":input[name='password']").val(), 
	       	    "des": $(":input[name='des']").val(),
	       	    "chinese": $(":input[name='chinese']").val(),
	       	    "id": $(":input[name='id']").val()
		}
		for(key in param) {
			if(!param[key]) {
				delete param[key];
			}
		}
		return param;
	}
		</script>
  <jsp:include page="/WEB-INF/common/dialogWindow.jsp" flush="true" />
   <jsp:include page="/WEB-INF/common/foot.jsp" flush="true" />
